package start;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

public class B implements I {
    private A a;
    @Autowired(required = false) private A2 a2;
    @Autowired private A[] aa;
    //@Autowired @Qualifier(value = "a3Bean") private A3 a3;
    public B() {
        System.out.println("Create "+this);        
    }
    @Autowired
    public void setA(A a) {
        System.out.println(this+":  setA("+a+")");
        this.a = a;
        System.out.println(aa.length);
    }

    public A getA() {
        System.out.println(this+":  getA()="+a);
        return a;
    }
    @Autowired
    protected void myMethod(@Qualifier("a3BeanQ") A3 a3q) {
        System.out.println(this+":  myMethod("+a3q+")");
    }
}
